# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>

pkgname=asio
pkgver=1.18.2
pkgrel=1
pkgdesc='Cross-platform C++ library for ASynchronous network I/O'
url='https://think-async.com/Asio/'
arch=('any')
license=('custom:boost')
makedepends=('boost')
source=(https://sourceforge.net/projects/asio/files/asio/${pkgver}%20%28Stable%29/asio-${pkgver}.tar.bz2)
sha512sums=('ebe659f958b1813c4a843dce94a8f51d3a3b9f8e0237aa0f032009adaf85400b63b04ac8d664c9424397927d34d78206cbc646d921a520ed415c505f086628b1')
b2sums=('8db47419180095e4f05a63e4f414f33399e44f1dfb36299c70fef8bfef347f25df67ae78abf6b6b051e350b10099ec49e751b129bb1913dadf792e24048233a2')

prepare() {
  cd ${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 COPYING LICENSE_1_0.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
